﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GestorDeFlotasDesktop.UILogic.Helpers
{
    public class DataGridViewHelpers
    {
        public static DataGridViewTextBoxColumn CreateDataGridViewTextBoxColumn(string DataPropertyName, string Name)
        {
            return CreateDataGridViewTextBoxColumn(DataPropertyName, Name, true);
        }
        public static DataGridViewTextBoxColumn CreateDataGridViewTextBoxColumn(string DataPropertyName, string Name, bool visible)
        {
            DataGridViewTextBoxColumn column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = DataPropertyName;
            column.Name = Name;
            column.Visible = visible;

            return column;
        }

        public static DataGridViewCheckBoxColumn CreateDataGridViewCheckBoxColumn(string DataPropertyName, string Name)
        {
            DataGridViewCheckBoxColumn column = new DataGridViewCheckBoxColumn();
            column.DataPropertyName = DataPropertyName;
            column.Name = Name;
            column.ReadOnly = true;
            return column;
        }
    }
}
